const Router = require('koa-router')

const { create, update, query, queryHistory } = require('../controller/duty.controller')
const { auth, verifyAdmin } = require('../middleware/auth.middleware')
const router = new Router({ prefix: '/duty' })

router.post('/', auth, create)

router.put('/', auth, update)

router.get('/', auth, verifyAdmin, query)

router.get('/history', auth, verifyAdmin, queryHistory)

module.exports = router